package com.oracle.dao;


import java.util.List;
import java.util.Map;

import com.oracle.jdbc.util.Dao;
import com.oracle.jdbc.util.Transactional;

public class BookDao {

	@Transactional
	public void save(String name,int price) {		
		Dao.executeSql("insert into book values(88,?,?)", name,price);
		System.out.println("test");
		Dao.executeSql("insert into book values(87,?,?)", name,price);
	}
	
	public List<Map<String,Object>> getAll(){
		
		return Dao.queryToMap("select author Auther,publisher pub,bookName ���� from book where author=?",new Object[] {"���"});
	}
	
	public Map<String,Object> getOne(){
		
		return Dao.queryOneToMap("select author Auther,publisher pub,bookName ���� from book where author=?",new Object[] {"���"});
	}
	
}
